﻿using UnityEngine;
using System.Collections;

public class Floating : MonoBehaviour {

	private float radian = 0;
	public float perradian = 0.2f;
	public float radius = 0.2f;

	private Vector3 oldPos;
	// Use this for initialization
	void Start () {
		oldPos = transform.position;
	}
	
	// Update is called once per frame
	void Update () {
		radian += perradian;
		float dy = Mathf.Cos (radian ) * radius;

		transform.position = oldPos + new Vector3 (0, dy, 0);
	}
}
